Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

343
Vistas
VueJS Unit testing - I cannot run my tests. "Command 'test/unit' does not exists"

I'm trying to setup Unit Tests with VueJS 3. Reading the docs of Vue 3, I Installed test-utils 2.0

My package.json file looks like this :

{
  "name": "testsUnitVue",
  "version": "0.1.0",
  "private": true,
  "scripts": {

    ...

    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "test:unit": "vue-cli-service test:unit",
    "lint": "vue-cli-service lint",

    ...

  },
  "dependencies": {
    ...
  },
  "devDependencies": {

    ...

    "@vue/test-utils": "^2.0.0-rc.21",

    ...

  }
}

I try to run my the tests with:

npm run test:unit

But I've the following error message:

> testsUnitVue@0.1.0 test:unit
> vue-cli-service test:unit

 ERROR  command "test:unit" does not exist.

I've a similar result with yarn command. How can I solve this?

PS: If you need more informations, then just leave a comment :)

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The @vue/test-utils does not provide the unit:test subcommand of vue-cli-service. Those are available when using one of the following plugins:

  • https://cli.vuejs.org/core-plugins/unit-jest.html
  • https://cli.vuejs.org/core-plugins/unit-mocha.html

For instructions on how to install those see: https://cli.vuejs.org/guide/plugins-and-presets.html#installing-plugins-in-an-existing-project

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda